#include <iostream>
#include <fstream>
#include <vector>
#include <string>

#include "point.h"

using namespace std;

int main()
{
    while (true)
    {
        vector<point> p;
        for (size_t i = 0; i < 100; i++)
            p.push_back({rand(), rand()});
        pair<point, point> res = max_distance(p);
        pair<point, point> st_res = max_distance(p);

        if (cmp_by_distance()(res, st_res) != EQUAL)
        {
            for (size_t j = 0; j < p.size(); j++)
                cerr << p[j] << ' ';

            break;
        }
        cerr << long_distance2(res.first, res.second) << ' ' << long_distance2(st_res.first, st_res.second) << '\n';
    }

    return 0;
}
